<template>


  <div class="homecontent">

    <div id="header">
      <button id="home_btn_img"><img src="@/assets/image/bmob.png"></button>
      <div style="float: right">
        <el-button class="home_login" type="primary" @click="saveNavState('/login')">登录</el-button>
        <el-button class="home_registered" @click="saveNavState('/registered')">注册</el-button>

      </div>
      <div id="menu">
        <a class="home_btn" href="#home">主页</a>
      </div>
      <router-view></router-view>
    </div>
    <div class="home_text">

      <h1>Qj 后端云 全方位一体化的后端服务平台</h1>
      <h2>提供可靠的 Serverless 云服务 轻松拥有开发中需要的各种后端能力</h2>

    </div>
    <div class="demo-image">
      <div class="block">
        <el-image
          style="width: 400px; height: 400px"
          :src="url"
        >
        </el-image>
      </div>
    </div>

  </div>
</template>

<script>
  export default {
    name: "Home",
    data() {
      return {
        fits: ['fill', 'contain', 'cover', 'none', 'scale-down'],
        url: 'https://assets2016.bmob.cn/css/images/index12.png',
      }

    },
    methods: {
      saveNavState(activePath) {
        this.$router.push(activePath)
      }
    }

  }
</script>

<style scoped>
  .homecontent {
    height: 100%;
    width: 100%;
    background-color: #292F3B;
  }

  #header {
    height: 50px;
    word-wrap: break-word;
    word-break: normal;

  }

  #home_btn_img {
    margin: 10px 0 0 20px;
  }

  .home_login {
    padding: 5px 20px;
    margin-top: 12px;
  }

  .home_registered {
    padding: 5px 20px;
    margin-top: 12px;
    margin-right: 20px;
  }

  #menu {
    width: 60px;
    margin: -25px auto;
    /*margin-top: -15px;*/

  }

  .home_btn {
    padding: 5px 15px;
    background-color: white;
    text-align: center;
  }

  /*伪类 鼠标经过链接变换背景色*/
  a:hover {
    background-color: red;
  }

  .home_text {
    margin-top: 100px;
  }

  h1, h2 {
    margin-top: 20px;
    color: white;
    text-align: center;
  }
  .demo-image{
    width: 400px;
    height: 350px;
    margin: 20px auto;
  }
  .banner_img {
    float: left;
    margin: 60px 0 0 60px;
    width: 400px;
    height: 300px;
  }




</style>

